package com.dc.refactoring._6_处理概括关系._8_ExtractInterface.newObject;

/**
 * Description: 员工
 * @author: gdc
 * @date: 2020/12/13
 * @version 1.0
 */
// step 2 实现新建的接口
public class Employee implements Billable{

    private int rate;

    private boolean hasSpecialSkill;

    public Employee(int rate, boolean hasSpecialSkill) {
        this.rate = rate;
        this.hasSpecialSkill = hasSpecialSkill;
    }

    // step 4 实现接口
    @Override
    public int getRate() {
        return rate;
    }

    @Override
    public boolean hasSpecialSkill() {
        return hasSpecialSkill;
    }
}
